#! /bin/sh
#
#
#

PUBH=$HOME/public_html
export PUBH

if [ -d $PUBH ] ; then
  echo "
You appear to already have a web directory ...
I will make sure it is world readable.
"
  chmod 755 $PUBH
else
  mkdir $PUBH
  chmod 755 $PUBH
fi

INDF=$HOME/public_html/index.html

if [ ! -f $INDF ] ; then
  echo '<html>
<p>
<h2> Sample home page of '"`whoami`"' </h2>
<p>
'"Created: `date`"'
<p>
</html>
' > $INDF
fi

chmod a+r $INDF

echo '

Your web material goes in subdirectory public_html and
your default index.html can be found in that directory.

Your web page is at http://'"`hostname`"'.it.jcu.edu.au/~'"`whoami`"'

'
ls -al $PUBH
